package cn.senjoeson.triper.utils;

/**
 * Created by senjoeson on 2018/2/22.
 */

public class IdsUtils {
    /**
     *
     * @param foodrinkId
     * @param planId
     * @param dayId
     * @return  得出需要设置的id
     */
    public static long setPlaceIds(long foodrinkId, long planId, long dayId) {
        return foodrinkId + 1000 * dayId + 10000 * planId + dayId;
    }

    /**
     *
     * @param nowId 当前需要调整的日期
     * @param planId 第几个计划
     * @param dayId 第几天
     * @return  算出原始的fooddrinkid
     */
    public static long getOriginId(long nowId, long planId, long dayId) {

        return nowId - (10000 * planId + 1000 * dayId + dayId);
    }

}
